package edu.hunau.cxb19.oop.class02;

import org.junit.Test;

/**
 *
 *@author hb
 *
 * 2020-02-25 14:52:55
 */
public class PointTest {

	@Test
	public void initPoint() {
		 Point p1 = new Point();//ctrl+2,L
		 p1.x=0;
		 p1.y=0;
		 System.out.println(p1);
		 
		 Point p4 = new Point();
		 System.out.println(p4);
		 
		 
		 Point p2 = new Point(1,2);
		 Point p21 = new Point(1,1);
		 
		 Point p3 = new Point(1);
		 
		
		 
	}
	
	@Test
	public void distanceTest() {
		Point p1 = new Point();//原点
		double d1 = p1.distance(3, 4);
		System.out.println(d1);
		
		Point p2 = new Point(2,3);
		p1.distance(p2);
		p2.distance(p1);
	}
	
	
}
